;;; init-options.el --- Built-in variables and modes -*- lexical-binding: t -*-
;;; Commentary:

;;; Code:
(require 'xdg)
(require 'org)

;; Org Mode
(setopt
  org-directory (expand-file-name "Org" (xdg-user-dir "DOCUMENTS"))
  org-default-notes-file (expand-file-name "default.org" org-directory))

(add-hook 'org-mode-hook 'visual-line-mode)

;; Eglot
(let ((hooks
        '(c-ts-mode-hook
          css-ts-mode-hook
          html-mode-hook
          js-ts-mode-hook
          python-ts-mode-hook
          rust-ts-mode
          web-mode-hook
          )))
  (dolist (h hooks)
    (add-hook h 'eglot-ensure)))

(with-eval-after-load 'eglot
  (let ((programs
          `(((web-mode :language-id "html")
             . ,(cdr (assoc 'html-mode eglot-server-programs)))
            )))
    (dolist (p programs)
      (add-to-list 'eglot-server-programs p))))

;; Hideshow
(add-hook 'prog-mode-hook 'hs-minor-mode)

(provide 'init-options)
;;; init-options.el ends here
